package org.jeecg.modules.demo.crm.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;
import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.modules.demo.crm.annotation.FileField;
import org.jeecg.modules.demo.crm.annotation.TitleField;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 增项需求表
 * @Author: jeecg-boot
 * @Date:   2025-06-18
 * @Version: V1.0
 */
@Data
@TableName("c_additional_request")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="c_additional_request对象", description="增项需求表")
public class CAdditionalRequest implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
    /**项目ID*/
    @TableField(updateStrategy = FieldStrategy.IGNORED)//空值也会修改 null修改
    @Excel(name = "项目ID", width = 15, dictTable = "c_project_application", dicText = "project_name", dicCode = "id")
    @Dict(dictTable = "c_project_application", dicText = "project_name", dicCode = "id")
    @ApiModelProperty(value = "项目ID")
    private String projectId;
	/**子项目*/
    @ApiModelProperty(value = "子项目")
    @TableField(updateStrategy = FieldStrategy.IGNORED)//空值也会修改 null修改
    @Excel(name = "子项目", width = 15, dictTable = "c_sub_project", dicText = "sub_project_name", dicCode = "id")
    @Dict(dictTable = "c_sub_project", dicText = "sub_project_name", dicCode = "id")
    private String subProjectId;

    @Excel(name = "报价人", width = 15, dictTable = "sys_user", dicText = "username", dicCode = "id")
    @Dict(dictTable = "sys_user", dicText = "username", dicCode = "id")
    private String assignUser;
	/**增项状态*/
	@Excel(name = "增项状态", width = 15)
    @ApiModelProperty(value = "增项状态")
    @Dict( dicCode = "additional_request_status")
    private String status;

	/**审核备注*/
	@Excel(name = "审核备注", width = 15)
    @ApiModelProperty(value = "审核备注")
    private String processingNotes;
	/**标题*/
	@Excel(name = "标题", width = 15)
    @ApiModelProperty(value = "标题")
    @TitleField // AOP 监听文件数据，存入文件表
    private String title;
	/**项目编号*/
	@Excel(name = "项目编号", width = 15)
    @ApiModelProperty(value = "项目编号")
    private String projectNumber;
	/**申请人*/
	@Excel(name = "申请人", width = 15)
    @ApiModelProperty(value = "申请人")
    private String applicant;
	/**申请日期*/
	@Excel(name = "申请日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "申请日期")
    private Date applicationDate;
	/**所属部门*/
	@Excel(name = "所属部门", width = 15)
    @ApiModelProperty(value = "所属部门")
    private String department;
	/**项目名称*/
	@Excel(name = "项目名称", width = 15)
    @ApiModelProperty(value = "项目名称")
    private String projectName;
	/**需求类型*/
	@Excel(name = "需求类型", width = 15)
    @ApiModelProperty(value = "需求类型")
    private String requestType;
	/**期望完成日期*/
	@Excel(name = "期望完成日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "期望完成日期")
    private Date expectFulfillData;
	/**优先级*/
	@Excel(name = "优先级", width = 15)
    @ApiModelProperty(value = "优先级")
    private String priority;
	/**仓库*/
	@Excel(name = "仓库", width = 15)
    @ApiModelProperty(value = "仓库")
    private String warehouse;
	/**预计完成日期*/
	@Excel(name = "预计完成日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "预计完成日期")
    private Date predictFulfillData;
	/**直接维修*/
	@Excel(name = "直接维修", width = 15)
    @ApiModelProperty(value = "直接维修")
    private String directMaintenance;
	/**采购品牌型号*/
	@Excel(name = "采购品牌型号", width = 15)
    @ApiModelProperty(value = "采购品牌型号")
    private String purchaseModel;
	/**采购数量*/
	@Excel(name = "采购数量", width = 15)
    @ApiModelProperty(value = "采购数量")
    private Integer purchaseQuantity;
	/**预估费用*/
	@Excel(name = "预估费用", width = 15)
    @ApiModelProperty(value = "预估费用")
    private BigDecimal purchaseEstimatedCost;
	/**申请原因*/
	@Excel(name = "申请原因", width = 15)
    @ApiModelProperty(value = "申请原因")
    private String applicationReason;
	/**申请内容*/
	@Excel(name = "申请内容", width = 15)
    @ApiModelProperty(value = "申请内容")
    private String applicationContent;
	/**维修/维保服务验收要求*/
	@Excel(name = "维修/维保服务验收要求", width = 15)
    @ApiModelProperty(value = "维修/维保服务验收要求")
    private String acceptingClaim;
	/**需求附件*/
	@Excel(name = "需求附件", width = 15)
    @ApiModelProperty(value = "需求附件")
    @FileField // AOP 监听文件数据，存入文件表
    private String appendix;

    /**原始文件*/
    @Excel(name = "原始文件", width = 15)
    @ApiModelProperty(value = "原始文件")
    @FileField // AOP 监听文件数据，存入文件表
    private String originalFile;

    // 新增字段，用于存储临时数据，不映射到数据库
    @TableField(exist = false)
    @ApiModelProperty(value = "报价记录")
    private Integer quoteRecord;

    // 新增字段，用于存储临时数据，不映射到数据库
    @TableField(exist = false)
    @ApiModelProperty(value = "工程报价")
    private Integer quotation;

    // 新增字段，用于存储临时数据，不映射到数据库
    @TableField(exist = false)
    @ApiModelProperty(value = "工程报价 是否有工程报价")
    private String quotationStatus;

    /**提交人员*/
    @Excel(name = "提交人员", width = 15, dictTable = "sys_user", dicText = "username", dicCode = "id")
    @Dict(dictTable = "sys_user", dicText = "username", dicCode = "id")
    @ApiModelProperty(value = "提交人员")
    private String userId;


}
